<template>
  <div class="login row">
    <div class="login-box row">
      <div class="left-banner">
        <h2 class="left-banner-title">MaX.计算机研究室</h2>
        <img class="left-banner-img" src="../static/assets/img/img.png" alt="">
      </div>
      <div class="right-login row">
        <div class="in-or-up">
          <a href="/" class="in-or-up-active">返回首页</a>
        </div>
        <div class="right-login-form col-9">
          <h4 class="form-type"><span class="form-type-active">登 陆</span></h4>
          <div class="right-login-username">
            <h5>用户名</h5>
            <input v-model="userForm.username" type="text" name="username" id="username" placeholder="请输入你的用户名">
          </div>
          <div class="right-login-password">
            <h5>密 码</h5>
            <input v-model="userForm.password" type="password" name="password" id="password">
          </div>
          <div class="right-login-button">
            <button type="button" @click="login">
              <!--                            <span v-if="type==='up'">注 册</span>-->
              <span>登 陆</span>
            </button>
            <button type="button" @click="backHome">
              <span>返回首页</span>
            </button>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "login",
  data(){
    return{
      userForm: {
        username: '',
        password: ''
      }
    }
  },
  methods: {
    backHome() {
      this.$router.push('/');
    }
  }
}
</script>

<style scoped>
body,div,p,h1,h2,h3,h4,h5,h6,ul,li,dl,dt,a,input,button,textarea,select{
  margin: 0;
  padding: 0;
}
.login {
  width: 100%;
  height: 100%;
  padding: 50px 0 0;
  /*background-color: #e2dbcc;*/
}
.login-box {
  width: 1200px;
  height: 800px;
  margin: 0 auto;
  border-radius: 10px;
  display: flex;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.left-banner {
  flex: 1;
  border-radius: 10px 0 0 10px;
  background-color: #2a9d8f;
  position: relative;
  overflow: hidden;
}
.left-banner-title {
  position: relative;
  z-index: 1;
  padding: 100px;
  text-align: left;
  /*font-size: 24px;*/
  color: #ffffff;
}
.left-banner-img {
  max-width: none;
  position: absolute;
  bottom: 0;
  left: 0;
  height: 800px;
  transition: left 4s linear ;
}
.left-banner-img:hover {
  left: -822px;
}
.in-or-up {
  position: absolute;
  top: 20px;
  right: 36px;
  width: 93px;
  height: 30px;
  line-height: 30px;
  border-radius: 15px;
  text-align: center;
  display: flex;
  overflow: hidden;
}
.in-or-up a {
  flex: 1;
  /*color: #7b8897;*/
  /*font-size: 13px;*/
  box-sizing: border-box;
  /*background-color: #4c5d72;*/
  cursor: pointer;
  transition: all .4s;
  color: #ffffff;
  background: #56c9bb;
}
.right-login {
  flex: 1;
  border-radius: 0 10px 10px 0;
  position: relative;
  background-color: #264653;
  box-shadow: -10px 0 30px rgba(0,0,0,0.2);
}
.right-login-form {
  /*position: absolute;*/
  /*top: 100px;*/
  /*left: 100px;*/
  /*width: 400px;*/
  display: flex;
  flex-direction: column;
  margin: auto;
}
.form-type {
  color: #7b8897;
  /*font-size: 24px;*/
}
.form-type span {
  display: inline-block;
  height: 60px;
  line-height: 60px;
  /*font-size: 34px;*/
  margin: 0;
  border-bottom: 1px solid transparent;
  transition: all .4s;
}
.form-type:first-child {
  margin: 0 10px 0 0;
}
.form-type-active {
  color: #ecedf0;
  border-bottom: 1px solid #56c9bb;
}
.right-login-username, .right-login-password {
  margin-top: 30px;
}
.right-login-username h5 {
  color: #d7d7d7;
  font-weight: normal;
  /*font-size: 20px;*/
  height: 30px;
  line-height: 30px;
}
.right-login-password h5 {
  color: #d7d7d7;
  font-weight: normal;
  /*font-size: 20px;*/
  height: 30px;
  line-height: 30px;
}
.right-login-username input {
  width: 100%;
  height: 50px;
  line-height: 50px;
  color: #ffffff;
  outline: none;
  border: 0;
  border-bottom: 2px solid #3e4e62;
  background: transparent;
  /*font-size: 20px;*/
  letter-spacing: 1px;
}
.right-login-password input {
  width: 100%;
  height: 50px;
  line-height: 50px;
  color: #ffffff;
  outline: none;
  border: 0;
  border-bottom: 2px solid #3e4e62;
  background: transparent;
  /*font-size: 20px;*/
  letter-spacing: 1px;
}
.right-login-button {
  margin-top: 40px;
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
}
.right-login-button button {
  width: 160px;
  height: 46px;
  line-height: 46px;
  outline: none;
  margin: 10px;
  /*font-size: 16px;*/
  color: #ffffff;
  background-color: #14d9b2;
  border: 0;
  border-radius: 23px;
  box-shadow: 0 10px 40px 10px rgba(0,0,0,0.2);
  cursor: pointer;
}
</style>
